package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.entity.Goods;
import com.dingreading.cloud.common.util.PageDto;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface GoodsService extends IService<Goods> {

    Page<Goods> pageListV3(PageUtil pageUtil, String name, Long categoryId, Integer enabled, Integer realStatus);

    long dropBean(Long id);

    // 更新操作人信息
    void updateLastStaffInfo(Long id, String staffUid, String staffName);

    boolean updateEnabledV3(Long id, Integer enabled, String staffUid, String staffName);

    boolean haveName(Long id, String name);

    List<Goods> listByCategoryIdOrIdIn(String categoryId, List<Long> ids);

    // 是否使用包邮模板
    boolean haveFreeDeliveryId(Long freeDeliveryId);

    Goods getDataById(Long id);

    PageDto<Goods> pageByCoupon(PageUtil pageUtil, String keyword, Long categoryId);
}
